import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import userList from '../views/userList.vue'
import taskList from '../views/taskList.vue'
import taskDataList from '../views/taskDataList.vue'
import companyList from '../views/companyList.vue'
import personnelList from '../views/personnelList.vue'
import login from '../views/login.vue'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    redirect: '/userlist',
    component: HomeView
  },
  {
    path: '/login',
    name: 'login',
    component: login
  },
  {
    path: '/userlist',
    name: 'userlist',
    component: userList
  },
  {
    path: '/tasklist',
    name: 'tasklist',
    component: taskList
  },
  {
    path: '/taskDatalist',
    name: 'taskDatalist',
    component: taskDataList
  },
  {
    path: '/companylist',
    name: 'companylist',
    component: companyList
  },
  {
    path: '/personnellist',
    name: 'personnellist',
    component: personnelList
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
